/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.arc.level;

import com.jme3.math.Vector3f;
import com.jme3.network.serializing.Serializable;
import com.arc.message.SerializableVector;
import com.jme3.scene.Spatial;

/**
 *
 * @author Adam
 */
@Serializable 
public class Snapshot{    
    private byte requestId;
    private float sentOn;
    private NetworkedNode root;
    
    public Snapshot()
    {  }
    
    public Snapshot(Snapshot snap){
        this.root = snap.root;
        this.requestId = snap.requestId;
    }
    
    public byte getId()
    {   return requestId; }
    
    public void setId(byte id)
    { requestId = id; }
    
    public void setRoot(NetworkedNode root){
        this.root = root;
    }
    
    public NetworkedNode getRoot(){
        return root;
    }       
    
    public float getSentTime()
    {
        return sentOn;
    }
    
    public void setSentTime(float timeOut)
    {
        sentOn = timeOut;
    }
    
    public boolean equals(Snapshot cmp){
        if(cmp == this)
            return true;
        if(getRoot().equals(cmp.getRoot()) && requestId == cmp.getId())
            return true;
        
        return false;
    }
}
